package com.hcss.common.constant;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.LinkedList;
import java.util.List;

/**
 * 配置文件中的常量参数
 */
@Getter
@Setter
@Component
@ConfigurationProperties(prefix="constant")
public class ConfigConstants {
    public static final String MOBILE_HEADER = "device";
    private Wechat wechat;
    private Auth auth;
    private Tencent tencent;
    private Rabbitmq rabbitmq;
    private String belongAp;// 所属机场三字码

    @Getter
    @Setter
    public static class Wechat {
        /**
         * debug模式模拟数据
         */
        private boolean debug;

        /**
         * 当前企业 企业微信corpid
         */
        private String corpid;

        /**
         * 默认secret 通讯录secret
         */
        private String defaultSecret;
    }

    @Getter
    @Setter
    public static class Auth {
        /**
         * 无权限页面
         */
        private String unauthPage;

        /**
         * 忽略的url
         */
        private List<String> ignoreURL = new LinkedList<>();
    }
    
    @Getter
    @Setter
    public static class Tencent {
    	private String mapKey;
    }

    @Getter
    @Setter
    public static class Rabbitmq {
        /**
         * 日志队列id
         */
        private String logName;

        /**
         * 货代与货站间的申报队列
         */
        private String agentDeclare;

        /**
         * 货代与货站的回执队列
         */
        private String agentResponse;
    }
}
